import 'package:car_map/page/groupingpage/groupingprovide/devicelist_provide.dart';
import 'package:car_map/page/index_page.dart';
import 'package:car_map/page/splash_page.dart';
import 'package:fluro/fluro.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:provide/provide.dart';

import 'page/loginpage/login_page.dart';
import 'page/routers/application.dart';
import 'page/routers/routers.dart';

void main(){

  var providers = Providers();
  var prjectList = DeviceListProvide();

  providers
    ..provide(Provider<DeviceListProvide>.value(prjectList));
  runApp(ProviderNode(child: MyApp(), providers: providers));
}

class MyApp extends StatelessWidget {

  MyApp() {
    final router = Router();
    Routes.configureRoutes(router);
    Application.router = router;
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: SplashPage(),
    );
  }
}

